﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->
    
<UserControl x:Class="Microsoft.Windows.Controls.Testing.KeyAndTargetTypeAreBothSet"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:input="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls.Input"
    xmlns:theming="clr-namespace:Microsoft.Windows.Controls.Theming;assembly=Microsoft.Windows.Controls.Theming"
    Width="400" Height="300">
    <StackPanel>
        <Grid Background="White" theming:ImplicitStyleManager.ApplyMode="OneTime">
            <Grid.Resources>
                <Style TargetType="input:NumericUpDown">
                    <Setter Property="Foreground" Value="Red" />
                </Style>
            </Grid.Resources>
            <input:NumericUpDown Value="10" x:Name="nud1"/>
        </Grid>
        <Grid Background="White" theming:ImplicitStyleManager.ApplyMode="OneTime">
            <Grid.Resources>
                <Style TargetType="input:NumericUpDown" x:Key="nudStyle">
                    <Setter Property="Foreground" Value="Red" />
                </Style>
            </Grid.Resources>
            <input:NumericUpDown Value="10" x:Name="nud2"/>
        </Grid>
    </StackPanel>
</UserControl>